package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Wy
 * @version V1.0
 * @Project MavenDemo
 * @Package com.qf.controller
 * @Description:
 * @Date 2022/6/9 10:22
 */
@Controller
@RequestMapping("/origin")
@CrossOrigin("http://localhost:8081")
public class CrossController {

         @RequestMapping("/test1")
         @ResponseBody
    public  String test1(){
             System.out.println("访问到跨域的方法");

        return "ok";
    }
}
